package com.legsem.jhosync.model;

import java.sql.Connection;

/**
 * Holds Connection objects (one per thread) that servlet code can safely use.
 */
public class ThreadLocalConnection {
    private static ThreadLocal < Connection > holder = new ThreadLocal < Connection >();

    private ThreadLocalConnection() {
    }

    public static Connection get() {
        return holder.get();
    }

    public static void set(Connection conn) {
        holder.set(conn);
    }
}
